//
//  CMCCIOTIGUnity.h
//  ig
//
//  Created by s on 16/6/15.
//  Copyright © 2016年 CMCCIOT. All rights reserved.
//

#import <Foundation/Foundation.h>


typedef NS_ENUM(NSInteger, NET_WORKD_TYPE) {
    
    DEVELOP_NTEWORKTYPE=0,
    GATEWAY_NTEWORKTYPE,
    DEMO_NTEWORKTYPE,
    AN_HUI_NTEWORKTYPE, 
    JIANG_SU_NTEWORKTYPE
    
};

@interface CMCCIOTIGUnity : NSObject

/*
*通过特定颜色创建图片
*颜色值color *
*大小imageRect*
*/
+(UIImage *)getImageByUIView:(CGRect  )imageRect  and:(UIColor  *)color;

/**
* 判断是否为两位小数,或者整数
*/
+(BOOL)regexTwoDecimalPlaces:(NSString  *)strTitle;

/**
 * 获取某一个环境地址信息
*/
+(NSDictionary  *)getCurrentDicAddress:(NET_WORKD_TYPE )netWsorkType;

/**
 * 获取所有地址
 */
+(NSArray  *)getAllAddress;

/**
获取本地缓存地址数据
*/
+(NSDictionary  *)getLoacleAddress;

#pragma mark NSUserDefalut

+(id)getUserDefault:(NSString  *)key; // 获取本地数据
+(void)setUserDefault:(id)object andKey:(NSString *)key; // 设置本地数据
+(void)removeUserDefaultObjectForKey:(NSString  *)key; // 移除本地数据

/**
 @brief 根据nibName  获取view
 @param nibName  xib 名称
 @param index  UIView 对应的索引
 @param recFrame  设置view的尺寸
 
 */

+(UIView  *)getViewByNibNameForIndex:(NSInteger)index andFrame:(CGRect )recFrame;
+(void)setWifiInfoCountTime;  // 设置wifi 参数过后 倒计时

+(NSDictionary    *)getRequestJson:(id  )dicJson;

+(CGSize )getSize:(NSString  *)strText andSize:(CGSize)size  and:(UIFont *)fontSize;
+(BOOL)isIllegal:(NSString *)strParama;

+(NSString *)getDateOfyyyyMMdd:(NSDate *)inputDate;
+(NSString  *)getJons:(id)dicJson;

@end
